import 'package:boss/ui/page/tableManagement/page/plusBatchTable/provider/plus_batch_table_provider.dart';
import 'package:boss/ui/page/tableManagement/page/plusBatchTable/widget/plus_batch_table_browser.dart';
import 'package:boss/ui/widget/back_confirmation.dart';
import 'package:boss/ui/widget/center_title_app_bar.dart';
import 'package:flutter/material.dart';
import 'package:hi_common/hi_common.dart';
import 'package:provider/provider.dart';
import 'package:router/annotation.dart';

@RouterConfig(PlusBatchTablePage.pageName)
class PlusBatchTablePage extends StatefulWidget {
  static const pageName = '/plusBatchTablePage';

  @override
  _PlusBatchTablePageState createState() => _PlusBatchTablePageState('批量新增桌台');
}

class _PlusBatchTablePageState extends BaseState<PlusBatchTablePage> {
  _PlusBatchTablePageState(String pageName) : super(pageName);

  @override
  Widget build(BuildContext context) {
    return ChangeNotifierProvider(
      create: (ctx) => PlusBatchTableProvider(),
      child: BackConfirmation(
        backConfirmationText: '桌台还未完成确认返回么？',
        child: Scaffold(
          appBar: CenterTitleAppBar(
            title: '批量新增桌台',
            backConfirmationText: '桌台还未完成确认返回么？',
          ),
          body: PlusBatchTableBrowser(),
        ),
      ),
    );
  }
}
